package A011thread;

class A003_实现线程方式二_实现Runnable接口_实现run方法 {

    public static void main(String[] args) {
        TestThread_2 r = new TestThread_2();
        Thread t1 = new Thread(r);
        Thread t2 = new Thread(r);
        t1.start();
        t2.start();
    }
}


class TestThread_2 implements Runnable {
    @Override
    public void run() {
        System.out.println("测试线程!");
    }
}